<div class="pl-3 pr-3 bg-white">
    <h4>仓库详情</h4>
    <!-- <ts-tabs [tabs]="['新增仓库','仓库合同']" [color]="global.params.color" [target]="tsTabs" activeTab="新增仓库">
    </ts-tabs> -->
</div>
<ts-datepicker #datepickerThree="tsDatepicker" [(ngModel)]="warehous.leaseStartTime" [color]="global.params.color" name="couponName"></ts-datepicker>
<ts-datepicker #datepicker="tsDatepicker" [(ngModel)]="warehous.leaseEndTime" [color]="global.params.color" name="couponName"></ts-datepicker>
<div class="p-2">
    <div #tsTabs='tsTabs' tsTabs class="card">
        <div class="card-body">
            <div tsTab tab='新增仓库'>
                <div class="card-body">
                    <div class="container m-0">
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">所属部门</label>
                            <div class="col-sm-10" style="display: flex">
                                <select [(ngModel)]="warehous.departmentId" class="custom-select" placeholder="请选择">
                                    <option value="" style="color: #b6b6b6" disabled selected selected="selected">请选择部门</option>
                                    <option *ngFor="let item of getlista" [ngValue]="item.id">{{item.departmentName}}</option>
                                </select>
                                <label class="col-sm-2 col-form-label label-required text-right">仓库名称</label>
                                <input [(ngModel)]="warehous.warehouseName" type="text" class="form-control" placeholder="请输入仓库名称">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">仓库编号</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.warehouseNumber" type="text" class="form-control" placeholder="请输入仓库编号">
                                <label class="col-sm-2 col-form-label label-required text-right">仓库面积</label>
                                <input [(ngModel)]="warehous.warehouseArea" type="text" class="form-control" placeholder="请输入仓库面积">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">仓库电话</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.warehousePhone" type="text" class="form-control" placeholder="请输入仓库电话">
                                <label class="col-sm-2 col-form-label label-required text-right">仓库高度</label>
                                <input [(ngModel)]="warehous.warehouseHeight" type="text" class="form-control" placeholder="请输入仓库高度">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">仓库地址</label>
                            <div class="col-sm-7" style="display: flex">
                                <input [(ngModel)]="warehous.warehouseAddress" style="width: 61%;" type="text" class="form-control" placeholder="请输入仓库地址">
                                <label class="col-sm-3 col-form-label label-required text-right">是否高位库</label>
                                <ts-switch [color]="global.params.color" style="padding-top: 10px" [values]="{open:1,close:0}" [(ngModel)]="warehous.isHighWarehouse"></ts-switch>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- <div class="mt-2 m-btn">
                    <button routerLink="/warehous/warehous" tsBtn color="white">返回列表</button>
                    <button *ngIf="warehous.id===0" tsBtn loading color="success" (submit)="confirmInsert($event)">确认添加</button>
                    <button tsBtn color="warning" (click)="resetForm()">添加</button>
                    <button *ngIf="warehous.id>0" tsBtn loading color="primary" (submit)="confirmUpdate($event)">确认修改</button>
                </div> -->
                <div style="margin-left: 40%;font-weight: 900; font-size:15px">仓库合同</div>
            </div>
            <div tsTab tab='仓库合同'>
                <div class="card-body">
                    <div class="container m-0">
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">租赁开始时间</label>
                            <div class="col-sm-10" style="display: flex">
                                <input tsToggle [target]="datepickerThree" [bind]="datepickerThree" [value]="warehous.leaseStartTime" placeholder="请选择日期"
                                    type="text" class="form-control ht bg-white pointer required">
                                <label class="col-sm-2 col-form-label label-required text-right">租赁结束时间</label>
                                <input tsToggle [target]="datepicker" [bind]="datepicker" [value]="warehous.leaseEndTime" placeholder="请选择日期"
                                type="text" class="form-control ht bg-white pointer required">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">租赁面积</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.leaseArea" type="text" class="form-control" placeholder="请输入租赁面积">
                                <label class="col-sm-2 col-form-label label-required text-right">租赁单价</label>
                                <input [(ngModel)]="warehous.leaseUnitPrise" type="text" class="form-control" placeholder="请输入租赁单价">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">仓库费用</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.warehouseLeaseCost" type="text" class="form-control" placeholder="请输入仓库费用">
                                <label class="col-sm-2 col-form-label label-required text-right">仓库月费</label>
                                <input [(ngModel)]="warehous.warehouseLeaseMonthCost" type="text" class="form-control" placeholder="请输入开户行名称">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">物业费用</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.propertyMonthCost" type="text" class="form-control" placeholder="请输入物业费用">
                                <label class="col-sm-2 col-form-label label-required text-right">水电费用</label>
                                <input [(ngModel)]="warehous.waterUnitPrice" type="text" class="form-control" placeholder="请输入水电费用">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">电费单价</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.electricityUnitPrice" type="text" class="form-control" placeholder="请输入电费单价">
                                <label class="col-sm-2 col-form-label label-required text-right">合同编号</label>
                                <input [(ngModel)]="warehous.contractNumber" type="text" class="form-control" placeholder="请输入合同编号">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">合同附件</label>
                            <div class="col-sm-10">
                                <ts-image-card #tsUp [(src)]="warehous.contractAttachment" [config]="options" title="点击选择"></ts-image-card>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mt-2 m-btn">
                    <button routerLink="/warehous/warehous" tsBtn color="white">返回列表</button>
                    <button *ngIf="warehous.id===0" tsBtn loading color="success" (submit)="confirmInsert($event)">确认添加</button>
                    <!-- <button tsBtn color="warning" >添加</button> -->
                    <button *ngIf="warehous.id>0" tsBtn loading color="primary" (submit)="confirmUpdate($event)">确认修改</button>
                </div>
            </div>
        </div>
    </div>
</div>